<template>

    <div id="job-application" class="w-h-100 pos-r flex-1 apply-container page-public-s" style="box-sizing: border-box;overflow:hidden;">
        <div class="w-h-100 ver-flex pos-a" style="box-sizing: border-box; padding: 6px;">
            <div style="box-sizing: border-box;">
                <el-card shadow="never" :body-style="{ paddingBottom: '0' }">
                    <el-form class="box-f" ref="queryForm" :inline="true">
                        <el-form-item :label="$t('b0t63v7bGsmbXkQdwW4Q0')">
                            <el-select 
                                v-model="searchVal" 
                                filterable 
                                class="m-2" 
                                :placeholder="$t('g6AmUBb2H8qwj8DuC0TH')" 
                                @change="searchChange"
                            >
                                <el-option
                                    v-for="item in searchOptions"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                />
                            </el-select>
                        </el-form-item>
                        <el-form-item>
                            <!-- 模糊查询 -->
                            <template v-if="searchVal === '1'">
                                <el-input v-model="transferVal" :placeholder="$t('yeyw245R7a6VYy19Otp1n')" />
                            </template>
                            <!-- 审批状态 -->
                            <template v-else-if="searchVal === '2'">
                                <el-select 
                                    v-model="transferVal" 
                                    filterable 
                                    class="m-2" 
                                    :placeholder="$t('uk_220Omr0p3DgKxFxwB4')" 
                                    @change="acquireChange"
                                    value-key="id"
                                >
                                    <el-option
                                        v-for="item in auditPle"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    />
                                </el-select>
                            </template>
                            <!-- 是否启用 -->
                            <template v-else-if="searchVal === '3'">
                                <el-select 
                                    v-model="transferVal" 
                                    filterable 
                                    class="m-2" 
                                    :placeholder="$t('4qSllUxIkPaA8Rqf3Jg8y')" 
                                    @change="acquireChange"
                                    value-key="id"
                                >
                                    <el-option
                                        v-for="item in responsiblePle"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    />
                                </el-select>
                            </template>
                            <!-- 时间段查询 -->
                            <template v-else>
                                <el-date-picker
                                    v-model="transferVal"
                                    type="datetimerange"
                                    range-separator="-"
                                    :start-placeholder="$t('zxGaloajaAo1yMttcStime')"
                                    :end-placeholder="$t('zxGaloajaAo1yMttcEtime')"
                                    value-format="YYYY-MM-DD HH:mm:ss"
                                />
                            </template>
                        </el-form-item>
                        <el-form-item >
                            <el-button @click='searchClick' type="primary" icon="ele-Search"> {{ $t('a4Uw6qeAZpctNhl3u7Uge') }} </el-button>
                            <el-button plain @click="resetClick" icon="ele-Refresh"> {{ $t('rxCkXeM2sO75ltcf8JyVj') }} </el-button>
                            <el-button v-if="$hasPer('jobApplication:add')" @click="nodeClick('')" icon="ele-Plus" type="primary"> {{ $t('kfR7oKqGr0sNpRoAhHcM') }} </el-button>
                        </el-form-item>
                    </el-form>
                </el-card>
            </div>

            <div style="box-sizing: border-box;" class="flex-1 pos-r">
                <div class="pos-a w-h-100" style="box-sizing: border-box;">
                    <el-card class="box-card w-h-100" shadow="never" style="margin-top: 16px;">
                        <div style="" class="w-h-100 ver-flex">
                            <div class="flex-1 pos-r">
                                <div class="pos-a w-h-100">

                                    <el-table :data="list" class="w-h-100" style="width: 100%" border v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.5)">
                                        
                                        <el-table-column type="index" :label="$t('3eKEs1bExAXarYpdJemp')" width="55" align="center" :index="indexMethod" />
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('tvGbL1MehJrp5EtEfWmB')"  align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('tvGbL1MehJrp5EtEfWmB')" v-model="searchVar.v_ProjectName" />
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.v_ProjectName === ''">-</span>
                                                    <span v-else>{{ scope.row.v_ProjectName }}</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('qVn0337gWLy0M0qCFzJ')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-select 
                                                        v-model="searchVar.v_JobTypeName" 
                                                        filterable 
                                                        class="m-2" 
                                                        value-key="id"
                                                        :placeholder="$t('qVn0337gWLy0M0qCFzJ')" 
                                                    >
                                                        <el-option
                                                            v-for="item in valueOption"
                                                            :key="item.id"
                                                            :label="item.value"
                                                            :value="item.id"
                                                        />
                                                    </el-select>
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_JobTypeName && scoped.row.v_JobTypeName !== ''">{{ scoped.row.v_JobTypeName }}</span>
                                                    <span v-else> - </span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="v_ApplyNO" :label="$t('7YrNDepF6YGnXofIKj30l')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('7YrNDepF6YGnXofIKj30l')" v-model="searchVar.v_ApplyNO" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_ApplyNO && scoped.row.v_ApplyNO !== ''">{{ scoped.row.v_ApplyNO }}</span>
                                                    <span v-else> - </span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>

                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="v_JobAddress" :label="$t('xuuQbgKgXbSnhNsF78bC')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('xuuQbgKgXbSnhNsF78bC')" v-model="searchVar.v_JobAddress" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_JobAddress && scoped.row.v_JobAddress !== ''">{{ scoped.row.v_JobAddress }}</span>
                                                    <span v-else> - </span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="v_ApplyContent" :label="$t('znlr2HhiXheU4cdB8JdS4')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('znlr2HhiXheU4cdB8JdS4')" v-model="searchVar.v_ApplyContent" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_ApplyContent && scoped.row.v_ApplyContent !== ''">{{ scoped.row.v_ApplyContent }}</span>
                                                    <span v-else> - </span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="v_ApplyEmpName" :label="$t('c5NzyFbtc8sW51KvMa9n')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('c5NzyFbtc8sW51KvMa9n')" v-model="searchVar.v_ApplyEmpName" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_ApplyEmpName && scoped.row.v_ApplyEmpName !== ''">{{ scoped.row.v_ApplyEmpName }}</span>
                                                    <span v-else> - </span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="" :label="$t('uk_220Omr0p3DgKxFxwB4')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-select 
                                                        v-model="transferVal" 
                                                        filterable 
                                                        class="m-2" 
                                                        :placeholder="$t('uk_220Omr0p3DgKxFxwB4')" 
                                                        @change="acquireChange"
                                                        value-key="id"
                                                    >
                                                        <el-option
                                                            v-for="item in auditPle"
                                                            :key="item.value"
                                                            :label="item.label"
                                                            :value="item.value"
                                                        />
                                                    </el-select>
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.n_AuditState === -1" style="color: #F56C6C;">{{ $t('xNx5qj0Ad0Oxydt0q1C') }}</span>
                                                    <span v-else-if="scope.row.n_AuditState === 0">{{ $t('gf0Sq2nS1hOty874oBt4g') }}</span>
                                                    <span v-else-if="scope.row.n_AuditState === 1" style="color: #67C23A;">{{ $t('1uO8o9kmpBShOnoFlN') }}</span>
                                                    <span v-else-if="scope.row.n_AuditState === 2" style="color: #E6A23C;">{{ $t('tzuZnLza7bAuCxmnbIFoc') }}</span>
                                                    <span v-else>{{ $t('u9BFyR2tsG3wjB01C77Rw') }}</span>
                                                    <!-- <span v-else>{{ $t('vDX1cjYx_6HyeG54ajvl') }}</span> -->
                                                </template>
                                            </el-table-column>
                                        </el-table-column>

                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('eHdy6iUn3cS1Nqd3eXMnV')" align="center">
                                            <template #default="scope">
                                                <span style="cursor: pointer;" @click="fileClick(scope.row.v_JobFilePath)" v-if="scope.row.v_JobFilePath">{{ $t('2KyEk7Ir2Lz3bN9ByjSaE') }}</span>
                                                <span v-else>{{ $t('tzv7Fao_8LvfFbddIkvDu') }}</span>
                                            </template>
                                        </el-table-column>
                                        
                                        <el-table-column width="260" :formatter="formatDate" :show-overflow-tooltip="true" prop="d_JobTime" :label="$t('0EDVq0EaoQowa5yp4H0')"  align="center">
                                            <el-table-column :show-overflow-tooltip="true" width="260" align="center">
                                                <template #header>
                                                    <el-date-picker
                                                        class="set-t"
                                                        v-model="searchVar.d_JobTime"
                                                        type="datetime"
                                                        value-format="YYYY-MM-DD HH:mm:ss"
                                                        :placeholder="$t('xYKtSx361Hm1x9r3giOx')"
                                                        popper-class="el-date-p"
                                                    >
                                                    </el-date-picker>
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.d_JobTime">{{ scope.row.d_JobTime }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column width="260" :formatter="formatDate" :show-overflow-tooltip="true" prop="d_IntendedCompletionTime" :label="$t('0EDVq0EaoQowa5yp4H1')"  align="center">
                                            <el-table-column :show-overflow-tooltip="true" width="260" align="center">
                                                <template #header>
                                                    <el-date-picker
                                                        class="set-t"
                                                        v-model="searchVar.d_IntendedCompletionTime"
                                                        type="datetime"
                                                        value-format="YYYY-MM-DD HH:mm:ss"
                                                        :placeholder="$t('xYKtSx361Hm1x9r3giOx')"
                                                        popper-class="el-date-p"
                                                    >
                                                    </el-date-picker>
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.d_IntendedCompletionTime">{{ scope.row.d_IntendedCompletionTime }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="" :label="$t('sfwbsExMM3lGjDuN5zHf')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-select 
                                                        v-model="transferVal" 
                                                        filterable 
                                                        class="m-2" 
                                                        :placeholder="$t('4qSllUxIkPaA8Rqf3Jg8y')" 
                                                        @change="acquireChange"
                                                        value-key="id"
                                                    >
                                                        <el-option
                                                            v-for="item in responsiblePle"
                                                            :key="item.value"
                                                            :label="item.label"
                                                            :value="item.value"
                                                        />
                                                    </el-select>
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.n_isValid === 1" style="color: #07AAF9;">{{ $t('iPfonvtxVLm7knSyCsLBo') }}</span>
                                                    <span v-else style="color: #FF5F33;">{{ $t('tzm8JwYsKnqKoNhheJlJx') }}</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :formatter="formatDate" :show-overflow-tooltip="true" prop="v_Remake" :label="$t('9RLaVEiJf1Z1Qv15o6Kll')" align="center" />

                                        <el-table-column min-width="160" :formatter="formatDate" :show-overflow-tooltip="true" prop="createdTime" :label="$t('xxAj6fsjvIsQrMdlNpolv')"  align="center" />

                                        <el-table-column min-width="160" :formatter="formatDate" :show-overflow-tooltip="true" prop="createdUserName" :label="$t('m6m2zmeJ3Vdo7p0eHEeUp')"  align="center" />

                                        <el-table-column min-width="160" :formatter="formatDate" :show-overflow-tooltip="true" prop="updatedTime" :label="$t('hMMqYalIdWhk0McqdxTg')"  align="center" />

                                        <el-table-column min-width="160" :formatter="formatDate" :show-overflow-tooltip="true" prop="updatedUserName" :label="$t('yRc0RHyyMh9Cy0TKyYr')"  align="center" />
                                        
                                        <el-table-column min-width="200" :label="$t('liBmO8wb58NMw5HLu9Nf')" align="center" fixed="right">
                                            <template #default="scope">
                                                <el-button v-if="$hasPer('jobApplication:detail')" @click="nodeClickTwo(scope.row)" class="icon-e" icon="ele-View" size="small" text type="primary"> {{ $t('deaKTj9gswMt8GaC9Sks') }} </el-button>
                                                <el-button v-if="$hasPer('jobApplication:del')" @click="deleteHandle(scope.row.n_Id , getData)" class="icon-e" icon="ele-Delete" size="small" text type="danger"> {{ $t('tyZ5gZi4hMvCsSGqzs7nQ') }} </el-button>
                                            </template>
                                        </el-table-column>
                                    
                                    </el-table>
                                </div>
                            </div>
                            <div style="height: 30px;margin-top: 20px;" class="hr-flex-start">
								<el-pagination
									v-model:currentPage="pageNo"
									v-model:page-size="pageSize"
									:total="totalRows"
									:page-sizes="[20, 50, 100]"
									small
									background
									@size-change="handleSizeChange"
									@current-change="handleCurrentChange"
									layout="total, sizes, prev, pager, next, jumper"
									class="w-h-100"
								/>
							</div>
                        </div>
                    </el-card>
                </div>
            </div>
        </div>
        <add-edit-job-application
            :repairInfo="repairInfo"
            :isUseDialog="isUseDialog"
            @updateData="getData"
            @cancelUseClick="cancelUseClick"
            @controlUseClick="controlUseClick"
        />
        <application-detail 
            :formInfo="formInfo"
            :repairInfo="repairInfo"
            :isUseDialog="isDetailDialog"
            @cancelDetailClick="cancelDetailClick"
        />
        <VModel
            :fileInfo="fileInfo"
            :isModelDialog="isModelDialog"
            @cancelModelClick="cancelModelClick"
        />
    </div>
</template>
<script lang="ts">
import { defineComponent, ref, onMounted , nextTick, reactive , toRaw } from 'vue'
import getTableData from '/@/utils/getTableData'
import { JobApplyQueryPageList , JobApplyCancelApply , sysDictDataList } from '/@/api/sms/sms'
import AddEditJobApplication from './component/add-edit-job-application.vue'
import ApplicationDetail from './component/application-detail.vue'
import { ElMessageBox , ElMessage } from 'element-plus'
import useCurrentInstance from '/@/utils/hook/useCurrentInstance';
import VModel from '../components/v-model.vue';
export default defineComponent( {
    name: 'job-application',
    components: {
        AddEditJobApplication,
        ApplicationDetail,
        VModel,
    },
    setup(props){
        const { proxy } = useCurrentInstance();
        const $t = proxy.$t;
        
        const isUseDialog = ref() // 新增/编辑弹出框隐藏/显示
        const isDetailDialog = ref(false)
        const repairInfo = ref() // 传递子组件数据
        const pathData = ref(import.meta.env.VITE_API_URL + '/') // 获取地址
        const formInfo = ref()
        const valueOption = ref();

        const isModelDialog = ref(false);
        const cancelModelClick = () => {isModelDialog.value = false};
        const fileInfo = ref('');

        /*** 查看文件 */
        const fileClick = (val: any) => {
            isModelDialog.value = true;
            let setObj: any = {};
            setObj.titleInfo = $t('eHdy6iUn3cS1Nqd3eXMnV');
            setObj.rectifyListArr = val;
            fileInfo.value = JSON.stringify(setObj);
        }

        const searchVar = reactive({
            v_ProjectName: '',
            v_JobTypeName: '',
            v_ApplyNO: '',
            v_JobAddress: '',
            v_ApplyContent: '',
            v_ApplyEmpName: '',
            d_JobTime: '',
            d_IntendedCompletionTime: '',
        });

        // 搜索类
        const transferVal = ref() // 需要查询的值
        const searchVal = ref('1')
        let searchObj:any = reactive({})
        let searchName = '1'
        /*** resetFun */
        const resetFun = () => {
            let newObj = Object.keys(searchObj)
            if(newObj.length !== 0){
                newObj.map((i:any) => {
                    searchObj[i] = ''
                })
            }
        }
        /*** 搜索类型选择事件 searchChange */
        const searchChange = (val:any) => {
            searchName = val
            transferVal.value = ''
        }
        /*** acquireChange 搜索下拉框选择的数据 ---- 传给接口数据 */
        const acquireChange = (val:any) => {
            console.log(val)
        }
        /*** searchClick 查询按钮 */
        const searchClick = () => {
            resetFun()
            if(searchName === '1'){ searchObj.searchValue = transferVal.value }
            if(searchName === '2'){ searchObj.n_AuditState = transferVal.value }
            if(searchName === '3'){ searchObj.n_isValid = transferVal.value }
            if(searchName === '4'){ 
                searchObj.startTime = toRaw(transferVal.value)[0] 
                searchObj.endTime = toRaw(transferVal.value)[1]
            } 
        }
        /*** resetClick 重置按钮 */
        const resetClick = () => {
            resetFun()
            transferVal.value = ''
            searchVal.value = '1'
        }
        // 搜索类

        /*** 截取数据格式方法 */
        const formatDate = (row:any, column:any) => {
          // 截取数据位null
          let data = row[column.property]
          if(data == null) {
            return '-'
          }

          // 截取时间
          if(data == $t('utiIUzqSzcKy0QiDc49n')){
            return '-'
          }else{
            return data
          }
        }

        /*** nodeClick 新增/编辑点击事件 */
        const nodeClick = (val:string | object) => {
            val !== '' ? repairInfo.value = JSON.stringify(toRaw(val)) : repairInfo.value = ''
            isUseDialog.value = true
        }

        /*** GetInfo 获取所有信息 */
        const GetInfo = async () => {
            // 作业类型
            let res:any = await sysDictDataList({ typeCode: 'job_Apply' })
            if(res.success) valueOption.value = res.data;
        }

        /*** nodeClickTwo 作业申请详情 */
        const nodeClickTwo = (val:any | object) => {
            val !== '' ? repairInfo.value = JSON.stringify(toRaw(val)) : repairInfo.value = ''
            let statusName = ''
            if(val.n_AuditState === -1) statusName = $t('xNx5qj0Ad0Oxydt0q1C');
            else if(val.n_AuditState === 0) statusName = $t('gf0Sq2nS1hOty874oBt4g');
            else if(val.n_AuditState === 1) statusName = $t('1uO8o9kmpBShOnoFlN');
            else if(val.n_AuditState === 2) statusName = $t('tzuZnLza7bAuCxmnbIFoc');
            else statusName = $t('u9BFyR2tsG3wjB01C77Rw');

            let n_isValidName = ''
            if(val.n_isValid === 1) n_isValidName = $t('iPfonvtxVLm7knSyCsLBo');
            else n_isValidName = $t('tzm8JwYsKnqKoNhheJlJx');
            let label = {
                label1: $t('tvGbL1MehJrp5EtEfWmB'),
                label2: $t('qVn0337gWLy0M0qCFzJ'),
                label15: $t('7YrNDepF6YGnXofIKj30l'),
                label3: $t('xuuQbgKgXbSnhNsF78bC'),
                label4: $t('znlr2HhiXheU4cdB8JdS4'),
                label5: $t('c5NzyFbtc8sW51KvMa9n'),
                label6: $t('uk_220Omr0p3DgKxFxwB4'),
                label7: $t('s4KbtSrTfOzuWyRcHgTxx'),
                label8: $t('0EDVq0EaoQowa5yp4H0'),
                label16: $t('0EDVq0EaoQowa5yp4H1'),
                label9: $t('sfwbsExMM3lGjDuN5zHf'),
                label10: $t('9RLaVEiJf1Z1Qv15o6Kll'),
                label11: $t('xxAj6fsjvIsQrMdlNpolv'),
                label12: $t('m6m2zmeJ3Vdo7p0eHEeUp'),
                label13: $t('hMMqYalIdWhk0McqdxTg'),
                label14: $t('yRc0RHyyMh9Cy0TKyYr'),
            }
            let setObj = {
                [label.label1]: val.v_ProjectName === '' ? '-' : val.v_ProjectName,
                [label.label2]: val.v_JobTypeName,
                [label.label15]: val.v_ApplyNO,
                [label.label3]: val.v_JobAddress,
                [label.label4]: val.v_ApplyContent,
                [label.label5]: val.v_ApplyEmpName,
                [label.label6]: statusName,
                // [label.label7]: val.v_JobFilePath,
                [label.label8]: val.d_JobTime,
                [label.label16]: val.d_IntendedCompletionTime,
                [label.label9]: n_isValidName,
                [label.label10]: val.v_Remake,
                [label.label11]: val.createdTime,
                [label.label12]: val.createdUserName,
                [label.label13]: val.updatedTime ? val.updatedTime : '-',
                [label.label14]: val.updatedUserName ? val.updatedUserName : '-',
            }
            formInfo.value = setObj;
            isDetailDialog.value = true
        }
        /*** deleteHandle 删除数据事件 */
        const deleteHandle = async (val: String | Number , updateFun: Function) => {
            ElMessageBox.confirm($t('5kmQjLqAhRftEaSxJ5diM'),$t('99FoyBoPtExRdppuYpkx'),
                {
                    confirmButtonText: $t('cpmrq09Mw3tfVmwWGsZzb'),
                    cancelButtonText: $t('wFa44E4Iz025Ha2gYeDop'),
                    type: 'warning',
                }
            )
            .then(async() => {
                let param = {n_Id : val}
                try {
                    let res:any = await JobApplyCancelApply(param)
                    if(res.success){
                        updateFun()
                    }
                } catch (err) { return }
            })
            .catch(() => {
                ElMessage({
                    type: 'info',
                    message: $t('ummczgwDCP3jaIVczZic'),
                })
            })
        }

        /*** cancelUseClick 取消事件 */
        const cancelUseClick = () => {
            isUseDialog.value = false
        }

        /*** cancelUseDetailClick 详情取消事件 */
        const cancelDetailClick = () => {
            isDetailDialog.value = false
        }

        /*** controlUseClick 提交事件 */
        const controlUseClick = () => {
            isUseDialog.value = false
        }

        onMounted(() => {
            nextTick(() => {
                GetInfo();
            })
        })

        return {
            ...getTableData(JobApplyQueryPageList,{},searchObj),
            isUseDialog,
            isDetailDialog,
            cancelUseClick,
            controlUseClick,
            cancelDetailClick,
            nodeClick,
            nodeClickTwo,
            repairInfo,
            deleteHandle,
            formInfo,
            valueOption,

            // 搜索类
            searchVal,
            transferVal,
            resetClick,
            searchClick,
            searchChange,
            acquireChange,
            searchOptions: [{
                value: '1',
                label: $t('3dBd6Gp5MqNm4A5dvcqJ4')
            }, {
                value: '2',
                label: $t('uk_220Omr0p3DgKxFxwB4')
            }, {
                value: '3',
                label: $t('4qSllUxIkPaA8Rqf3Jg8y')
            }, {
                value: '4',
                label: $t('bxOzlOcGrW1Oanu81ddgi')
            }], // 搜索方式
            auditPle: [
                { label: $t('phlQhIwNkw1nDaSmhxpG8') , value: 0 },
                { label: $t('w4VhwoPcGmZvsLAw9Ejgt') , value: -1 },
                { label: $t('yGsrk2SvPdeMMz9RtDiLl') , value: 1 },
                { label: $t('1Eky213Jts1mf6p7goA9L') , value: 2 },
                { label: $t('o8f7fCjMywm3YjIudQiC') , value: 3 },
                // { label: $t('gf1hWfVmK0UkFtSUxMxtg') , value: 4 },
            ], // 审批状态
            responsiblePle: [
                { label: $t('iPfonvtxVLm7knSyCsLBo') , value: 1 },
                { label: $t('tzm8JwYsKnqKoNhheJlJx') , value: 2 },
            ], // 是否启用
            // 搜索类

            formatDate,
            pathData,
            searchVar,

            isModelDialog,
            cancelModelClick,
            fileInfo,
            fileClick,
        }
    },
} )
</script>
<style lang="scss"> @import '../style/public.scss'; </style>
<style scoped lang="scss">
    #job-application {
        .box-f{
            :deep(.el-form-item__label){
                padding: 0;
            }
        }
        :deep(.el-card__body) {
            height: 100%;
        }
        :deep(.el-card){
            border: none !important;
        }
        ul {

            list-style: none;

            li {
                cursor: pointer;

                &:hover {
                    color: red;
                }
            }
        }
        .icon-e{
            :deep(.el-icon){
                margin-right: 0px!important;
            }
        }
    }
</style>